package control;

import Bean.Customer;
import java.sql.SQLException;
import model.CustomerManagerModel;
import model.ResultSetTableModel;

public class CustomerManagerControl
{

    CustomerManagerModel cmModel = new CustomerManagerModel();

    public ResultSetTableModel getCustomerCategory()
    {
        return cmModel.getAllCustomerCategory();
    }

    public Customer getCustomer(int ID)
    {
        return cmModel.getCustomer(ID);
    }

    public boolean editCustomer(Customer Customer)
    {
        return cmModel.editCustomer(Customer);
    }

    public boolean addCustomer(Customer Customer)
    {
        return cmModel.addCustomer(Customer);
    }

    public boolean deleteCustomer(int ID)
    {
        return cmModel.deleteCustomer(ID);
    }

    public ResultSetTableModel filterNameCustomer(String key)
    {
        return cmModel.filterNameCustomer(key);
    }

    public ResultSetTableModel filterPhoneCustomer(String key)
    {
        return cmModel.filterPhoneCustomer(key);
    }

    public ResultSetTableModel filterCMTNDCustomer(String key)
    {
        return cmModel.filterCMTNDCustomer(key);
    }

    public boolean TestInforCustomer(int ID) throws SQLException
    {
        return cmModel.TestInforCustomer(ID);
    }
}
